<template>
    <div class="container">
        <div class="card">
            <el-breadcrumb separator="/" class="card-body">
                <el-breadcrumb-item :to="{ path: '/AdminHome' }"><i class="el-icon-location"></i>首页</el-breadcrumb-item>
                <el-breadcrumb-item>{{ this.$route.meta.title }}</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="card">
            <div class="card-header">用户查询</div>
            <div class="card-body">
                <div class="query-criteria clearfix">
                    <el-form :inline="true" :model="assetsSort" class="demo-form-inline f-left">
                        <div class="el-form-item el-form-item--small"><label class="el-form-item__label">请选择</label></div>
                        <el-form-item style="margin-bottom:0">
                            <el-col :span="11">
                            <el-form-item prop="date1">
                                <el-date-picker type="date" placeholder="选择日期" v-model="assetsSort.date1" style="width: 100%;"></el-date-picker>
                            </el-form-item>
                            </el-col>
                            <el-col class="line" :span="1">-</el-col>
                            <el-col :span="11">
                            <el-form-item prop="date2">
                                <el-date-picker type="date" placeholder="选择日期" v-model="assetsSort.date2" style="width: 100%;"></el-date-picker>
                            </el-form-item>
                            </el-col>
                        </el-form-item>
                        <el-form-item>
                            <el-select v-model="assetsSort.secretLevel" placeholder="状态">
                                <el-option label="正常" value="beijing"></el-option>
                                <el-option label="异常" value="shanghai"></el-option>
                                <el-option label="警告" value="beijing"></el-option>
                                <el-option label="危险" value="beijing"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item>
                            <el-input v-model.trim="assetsSort.otherInfo" placeholder="用户/IP地址"></el-input>
                        </el-form-item>
                        <el-form-item>
                            <el-button type="primary" @click="onSubmit">查询</el-button>
                        </el-form-item>
                    </el-form>
                        <div class="fn-btn f-right">
                            <el-button type="warning" icon="el-icon-download" @click="toNewUser">导出日志</el-button>
                        </div>
                </div>
            </div>
        </div>
        <div class="card">
            <div class="card-header">
                资产操作日志
            </div>
            <div class="card-body">
                <el-table stripe :data="tableData" style="width: 100%">
                    <el-table-column prop="name" label="责任人" width="120px">
                    </el-table-column>
                    <el-table-column prop="time" label="操作时间" width="">
                    </el-table-column>
                    <el-table-column prop="number" label="操作账号" width="">
                    </el-table-column>
                    <el-table-column prop="ip" label="IP地址" width="">
                    </el-table-column>
                    <el-table-column prop="assCode" label="资产编码" width="">
                    </el-table-column>
                    <el-table-column prop="state" label="操作状态" width="">
                    </el-table-column>
                    <el-table-column prop="content" label="操作内容">
                    </el-table-column>
                </el-table>
                <div class="page-wrap">
                    <el-pagination background layout="prev, pager, next" :total="1000"></el-pagination>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
  name: "SystemLog",
  data() {
    return {
      tableData: [
        {
          name: "王小虎",
          time: "2019/03/23 18:00",
          number: "admin",
          ip:"192.168.1.23",
          assCode: "zc-213123",
          state: "成功",
          content: "导入了资产"
        },
        {
          name: "王小虎",
          time: "2019/03/23 18:00",
          number: "admin",
          ip:"192.168.1.23",
          assCode: "zc-213123",
          state: "成功",
          content: "更改资产状态为[在用]"
        },
        {
          name: "王小虎",
          time: "2019/03/23 18:00",
          number: "admin",
          ip:"192.168.1.23",
          assCode: "zc-213123",
          state: "成功",
          content: "登录了系统"
        },
        {
          name: "王小虎",
          time: "2019/03/23 18:00",
          number: "admin",
          ip:"192.168.1.23",
          assCode: "zc-213123",
          state: "成功",
          content: "退出登录"
        },
        {
          name: "王小虎",
          time: "2019/03/23 18:00",
          number: "admin",
          ip:"192.168.1.23",
          assCode: "zc-213123",
          state: "异常",
          content: "跨国IP(111.32.42.101)登录"
        }
      ],
      assetsSort: {
        classify: "",
        date1: "",
        date2: "",
        state: "",
        group: "",
        secretLevel: "",
        otherInfo: ""
      }
    };
  },
  methods: {}
};
</script>
